package com.yaodian100.ec.payment.entity;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;

import com.yaodian100.core.common.entity.BaseEntity;

@Entity
@Table(name = "EC_BONUS_TRANSFER")
public class BonusTransfer extends BaseEntity {

	@Id
	@GeneratedValue(generator = "seq_ec_bonus_transfer")
	@GenericGenerator(name = "seq_ec_bonus_transfer", strategy = "com.yaodian100.core.common.dao.hibernate.SeqStringGenerator", parameters = {
			@Parameter(name = "sequence", value = "seq_ec_bonus_transfer"),
			@Parameter(name = "pattern", value = "BNT0000000000") })
	@Column(name = "ID", length = 20)
	private String id;

	@Column(name = "bonus_id", nullable = false)
	private Long bonusId;

	@Column(name = "use_bonus", nullable = false, columnDefinition = "numeric(10,2)")
	private BigDecimal useBonus;

	@Column(name = "refound_bonus", nullable = false, columnDefinition = "numeric(10,2)")
	private BigDecimal refoundBonus;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "expire_date")
	private Date expireDate;

	@Column(name = "order_id", length = 13, nullable = false)
	private String orderId;

	@Column(name = "rate", nullable = false, columnDefinition = "numeric(10,2)")
	private BigDecimal rate;

	@Column(name = "member_id", length = 10, nullable = false)
	private String memberId;

	public Long getBonusId() {
		return bonusId;
	}

	public Date getExpireDate() {
		return expireDate;
	}

	public String getId() {
		return id;
	}

	public String getMemberId() {
		return memberId;
	}

	public String getOrderId() {
		return orderId;
	}

	public BigDecimal getRate() {
		return rate;
	}

	public BigDecimal getRefoundBonus() {
		return refoundBonus;
	}

	public BigDecimal getUseBonus() {
		return useBonus;
	}

	public void setBonusId(Long bonusId) {
		this.bonusId = bonusId;
	}

	public void setExpireDate(Date expireDate) {
		this.expireDate = expireDate;
	}

	public void setId(String id) {
		this.id = id;
	}

	public void setMemberId(String memberId) {
		this.memberId = memberId;
	}

	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}

	public void setRate(BigDecimal rate) {
		this.rate = rate;
	}

	public void setRefoundBonus(BigDecimal refoundBonus) {
		this.refoundBonus = refoundBonus;
	}

	public void setUseBonus(BigDecimal useBonus) {
		this.useBonus = useBonus;
	}

}
